package dk.oldommer.bjw;

import org.hibernate.*;
import org.hibernate.cfg.*;
public class HibernateUtil {
	private static final SessionFactory sessionFactory;
	
	static {
		try {
			sessionFactory = new Configuration().configure().buildSessionFactory();
		}
		
		catch (Throwable exception) {
			System.err.println("Failed to create session factory: " + exception.getMessage());
			exception.printStackTrace();
			throw new ExceptionInInitializerError(exception);
		}
	}
	
	public static SessionFactory getSessionFactory() {
		return sessionFactory;
	}

}
